﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="../css/ss01.css">
    <script language="JScript" src="../js/Function.js"></script>
    <script language="JScript" src="../js/myCheck.js"></script>
    <script language="javascript">
        window.onload = useridFieldInit;

        function useridFieldInit() {
	        var userid = "";
	        userid=getCookie("ncms_userid");

	        document.getElementById("user_id").value = userid;
        }
        
        function getCookie(name){
              var strCookie=document.cookie;
              var arrCookie=strCookie.split("; ");
              for(var i=0;i<arrCookie.length;i++){
                    var arr=arrCookie[i].split("=");
                    if(arr[0]==name)return arr[1];
              }
              return "";
        }
        
        function addCookie(name,value,expireHours){
              var cookieString=name+"="+escape(value);
              //判断是否设置过期时间,0=永不过期
              if(expireHours>0){
                     var date=new Date();
                     date.setTime(date.getTime+expireHours*3600*1000);
                     cookieString=cookieString+"; expire="+date.toGMTString();
              }
              document.cookie=cookieString;
        }

        function deleteCookie(name){
               var date=new Date();
               date.setTime(date.getTime()-10000);
               document.cookie=name+"=v; expire="+date.toGMTString();
        }

        function setCookie() {
	        var expireDate = new Date();
	        expireDate.setMonth(expireDate.getMonth()+6);
        	
	        var userid = document.getElementById("user_id").value;
	        document.cookie = "ncms_userid=" + userid + ";expires=" + expireDate.toGMTString();
	    }
        
        function saveCookie()
        {
            if(document.getElementById("remember").checked==true)
            {
                setCookie();
            }
        }
    </script>
    <script type="text/javascript" language="javascript">
        function chk()
        {
			if(CheckText(form1.user_id,"登录名",100)==false) return false;
            
            saveCookie();
            
			return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width ="100%" style="height:100%" >
            <tr style="height:20%">
                <td></td>
            </tr>
            <tr>
                <td style="height: 385px">
                    <table width ="100%" >
                        <tr>
                            <td  style="background-color:#0075B0; height :47px" valign="middle"><DIV style="text-align: left ; font-family:Arial; text-align:left;" >
<DIV ><span style=" font-family:'Arial Black'; color:#FFFFFF; font-size:16pt;"><b>&nbsp;&nbsp;&nbsp;&nbsp;MagSpace</b></span></DIV></DIV></td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                        </tr>
                        
                        <tr>
                            <td valign="middle">
                                <table width='100%'>
                                    <tr>
                                        <td valign="middle" align="center" style="width:30%" >
                                            <div >
                                                <table  width='240px'  style=" font-size:12px; border-top:1px #0075B0 solid;border-right:1px #0075B0 solid; border-left:1px #0075B0 solid; border-bottom:1px #0075B0 solid; background-color:#EEF6F8;"  ><tr><td ><div>
                                                <table cellpadding="4" cellspacing="0" >
                                                    <tr>
                                                        <td align="left">用户名：</td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <asp:TextBox ID="user_id" runat="server" Width='160px'></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">域名：</td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <asp:DropDownList ID='ddldomain' runat="server" ><asp:ListItem Selected='true' Text='@cnap.com.cn' Value='@cnap.com.cn'></asp:ListItem><asp:ListItem Text='@autocar.com.cn' Value='@autocar.com.cn'></asp:ListItem></asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">密码：</td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <asp:TextBox ID="password" runat="server" TextMode="Password" Width='160px'></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">验证码：</td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <asp:TextBox ID="vercode" runat="server" Width='60px'></asp:TextBox>&nbsp;&nbsp;<asp:Image id="vcode" runat="server" ImageAlign="AbsBottom"></asp:Image>&nbsp;&nbsp;<img src="images/u3.png" style ="cursor:pointer" onclick='location.href=location.href;' />
                                                        </td>
                                                    </tr>
                                                    <tr><td>&nbsp;</td></tr>
                                                    <tr>
                                                        <td style="border:1px; background-color:#0075B0" ></td>
                                                    </tr>
                                                    <tr><td>&nbsp;</td></tr>
                                                    <tr>
                                                        <td align="center" >
                                                            <asp:Button ID="btnLogin" runat="server" Text="登录" OnClick="btnLogin_Click" BackColor="#0075B0" ForeColor="White" />
                                                            <font style="font-size: 10pt; color: red;"><asp:Literal ID="msg" runat="server"></asp:Literal></font>
                                                        </td>
                                                    </tr>
                                                </table></div>
                                                </td></tr></table>
                                            </div>
                                        </td>
                                        <td style="width:70%" align="center"  >
                                            <table>
                                                <tr>
                                                    <td>
                                                        <img src='images/u13.jpg' /><br />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left">
                                                        <span style=" font-family:'Arial'; color:#0075B0; font-size:10pt;">MagSpace enterprise OA system<br>Facilitate communication<br>Efficient</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr><td>&nbsp;</td></tr>
                        <tr>
                            <td  style=" background-color:#0075B0; height:1px "></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="height:20%"><span style=" font-family:'Arial'; color:#000000; font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;SEEC</span></td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
